package com.greensam.pixelengine.service;

import com.greensam.pixelengine.pojo.base.PaginationResponse;
import com.greensam.pixelengine.pojo.emuns.SpaceTypeEnum;
import com.greensam.pixelengine.pojo.entity.SpacePo;
import com.greensam.pixelengine.pojo.query.SpacePageQuery;
import com.greensam.pixelengine.pojo.query.SpaceRankListQuery;

import java.util.Collection;
import java.util.List;
import java.util.Optional;

/**
 * @author Ma Chengrui
 * @since 2025/8/2 14:22
 */
public interface SpaceDataService {

    PaginationResponse<SpacePo> pageSpace(SpacePageQuery pageQuery);

    Optional<SpacePo> getSpaceById(Long id);

    Optional<SpacePo> getSpaceByUserId(Long userId, SpaceTypeEnum spaceType);

    SpacePo save(SpacePo spacePo);

    List<SpacePo> listSpace();

    List<SpacePo> listSpaceRank(SpaceRankListQuery query);

    List<SpacePo> listSpaceByIds(Collection<Long> spaceIds);
}
